--MOD Name
name = "[DST] Musha [REMAKE][Client]"

-- Mod Authors
author = "Fengying"

--MOD Version
version = "2.26.1"

--MOD Description
description =
	[[This mod is an optional client mod for Musha [REMAKE], which allows players to set their habitual keys without affecting other players]]
--link

--MOD priority 优先级设置，需要调整优先级请到这里更改Priority信息
api_version = 10
priority = -1000

-- Engine/DLC Compatibility
-- Don't Starve Together
dst_compatible = true
-- Don't Starve(it‘s to not work)
dont_starve_compatible = false
-- Don't Starve: Shipwrecked
shipwrecked_compatible = false
-- Don't Starve: Reign of Giants
reign_of_giants_compatible = false

-- Mods which add new objects are required by all clients.
all_clients_require_mod = false
-- Client-only mods don't affect other players or the server.
client_only_mod = true
--Server special
--server_only_mod = false

-- Preview image
icon_atlas = "modicon.xml"
icon = "modicon.tex"

server_filter_tags = {"musha"}

local never = {{description = "", data = false}}
--Refer to other mod designs
local function Breaker(title, hover)
	return {
		name = title,
		hover = hover,
		options = never,
		default = false
	}
end

local key_table = {
	{description = "TAB", data = 9},
	{description = "KP_PERIOD", data = 266},
	{description = "KP_DIVIDE", data = 267},
	{description = "KP_MULTIPLY", data = 268},
	{description = "KP_MINUS", data = 269},
	{description = "KP_PLUS", data = 270},
	{description = "KP_ENTER", data = 271},
	{description = "KP_EQUALS", data = 272},
	{description = "MINUS", data = 45},
	{description = "EQUALS", data = 61},
	{description = "SPACE", data = 32},
	{description = "ENTER", data = 13},
	{description = "ESCAPE", data = 27},
	{description = "HOME", data = 278},
	{description = "INSERT", data = 277},
	{description = "DELETE", data = 127},
	{description = "END", data = 279},
	{description = "PAUSE", data = 19},
	{description = "PRINT", data = 316},
	{description = "CAPSLOCK", data = 301},
	{description = "SCROLLOCK", data = 302},
	{description = "RSHIFT", data = 303}, -- use SHIFT instead
	{description = "LSHIFT", data = 304}, -- use SHIFT instead
	{description = "RCTRL", data = 305}, -- use CTRL instead
	{description = "LCTRL", data = 306}, -- use CTRL instead
	{description = "RALT", data = 307}, -- use ALT instead
	{description = "LALT", data = 308}, -- use ALT instead
	{description = "ALT", data = 400},
	{description = "CTRL", data = 401},
	{description = "SHIFT", data = 402},
	{description = "BACKSPACE", data = 8},
	{description = "PERIOD", data = 46},
	{description = "SLASH", data = 47},
	{description = "LEFTBRACKET", data = 91},
	{description = "BACKSLASH", data = 92},
	{description = "RIGHTBRACKET", data = 93},
	{description = "TILDE", data = 96},
	{description = "A", data = 97},
	{description = "B", data = 98},
	{description = "C", data = 99},
	{description = "D", data = 100},
	{description = "E", data = 101},
	{description = "F", data = 102},
	{description = "G", data = 103},
	{description = "H", data = 104},
	{description = "I", data = 105},
	{description = "J", data = 106},
	{description = "K", data = 107},
	{description = "L", data = 108},
	{description = "M", data = 109},
	{description = "N", data = 110},
	{description = "O", data = 111},
	{description = "P", data = 112},
	{description = "Q", data = 113},
	{description = "R", data = 114},
	{description = "S", data = 115},
	{description = "T", data = 116},
	{description = "U", data = 117},
	{description = "V", data = 118},
	{description = "W", data = 119},
	{description = "X", data = 120},
	{description = "Y", data = 121},
	{description = "Z", data = 122},
	{description = "F1", data = 282},
	{description = "F2", data = 283},
	{description = "F3", data = 284},
	{description = "F4", data = 285},
	{description = "F5", data = 286},
	{description = "F6", data = 287},
	{description = "F7", data = 288},
	{description = "F8", data = 289},
	{description = "F9", data = 290},
	{description = "F10", data = 291},
	{description = "F11", data = 292},
	{description = "F12", data = 293},
	{description = "UP", data = 273},
	{description = "DOWN", data = 274},
	{description = "RIGHT", data = 275},
	{description = "LEFT", data = 276},
	{description = "PAGEUP", data = 280},
	{description = "PAGEDOWN", data = 281},
	{description = "0", data = 48},
	{description = "1", data = 49},
	{description = "2", data = 50},
	{description = "3", data = 51},
	{description = "4", data = 52},
	{description = "5", data = 53},
	{description = "6", data = 54},
	{description = "7", data = 55},
	{description = "8", data = 56},
	{description = "9", data = 57}
}

configuration_options = {
	Breaker("Language", "Choose your language."),
	{
		name = "modlanguage",
		label = "Mod Language",
		hover = "[*]If your server has a cave, you have to select a language.\n[*]케이브 포함 서버인 경우 언어를 선택해야합니다.\n[*]",
		options = {
			{description = "Auto", data = -1},
			{description = "English", data = 0},
			{description = "한글", data = 19},
			{description = "中文", data = 22},
			{description = "русский", data = 16}
		},
		default = -1
	},
	Breaker("Game Settings"),
	{
		name = "difficult_damage",
		label = "Melee Damage",
		hover = "Musha Basic Melee Damage",
		options = {
			{description = "Newbie", data = 1.5},
			{description = "Super Easy", data = 1.25},
			{description = "Very Easy", data = 1},
			{description = "Easy(75)", data = 0.75},
			{description = "Normal(55)", data = 0.55},
			{description = "Hard(40)", data = 0.4},
			{description = "Hardcore(25)", data = 0.25}
		},
		default = 0.55
	},
	{
		name = "difficult_damage_range",
		label = "Range Damage",
		hover = "Musha Basic Range Damage",
		options = {
			{description = "Veasy(x1.35)", data = 1.35},
			{description = "Easy(x1.2)", data = 1.2},
			{description = "Normal(x1)", data = 1},
			{description = "Hard(x0.9)", data = 0.9},
			{description = "Hardcore(x0.75)", data = 0.75}
		},
		default = 1
	},
	{
		name = "difficult_mana",
		label = "Mana Regen",
		hover = "Difficulty of mana regen",
		options = {
			{description = "VeryEasy", data = 0.5},
			{description = "Easy", data = 0.2},
			{description = "Normal", data = 0.1},
			{description = "Hard", data = 0.06},
			{description = "Hardcore", data = 0.04}
		},
		default = 0.1
	},
	{
		name = "difficulty_sniff",
		label = "Sniff",
		hover = "How much regenerate [Sniff] during sleeping",
		options = {
			{description = "Easy", data = 1.25},
			{description = "Normal", data = 1},
			{description = "Hard", data = 0.85},
			{description = "Hardcore", data = 0.75}
		},
		default = 1
	},
	{
		name = "difficult_music",
		label = "Music",
		hover = "How much regenerate [Music] during sleeping",
		options = {
			{description = "VeryEasy", data = 2},
			{description = "Easy", data = 1.5},
			{description = "Normal", data = 1},
			{description = "Hard", data = 0.85},
			{description = "Hardcore", data = 0.7}
		},
		default = 1
	},
	{
		name = "difficult_tired",
		label = "Tired",
		hover = "Difficulty of Tired",
		options = {
			{description = "VeryEasy", data = 0.6},
			{description = "Easy", data = 0.8},
			{description = "Normal", data = 1},
			{description = "Hard", data = 1.2},
			{description = "Hardcore", data = 1.35}
		},
		default = 1
	},
	{
		name = "difficult_sleep",
		label = "Sleep",
		hover = "Difficulty of Sleep",
		options = {
			{description = "VeryEasy", data = 2},
			{description = "Easy", data = 1.5},
			{description = "Normal", data = 1},
			{description = "Hard", data = 0.5},
			{description = "Hardcore", data = 0.25}
		},
		default = 1
	},
	{
		name = "musha_level_difficulty",
		label = "Levelup Difficulty",
		hover = "How hard is musha to upgrade",
		options = {
			{description = "very easy x0.5", data = 0.5},
			{description = "easy", data = 1},
			{description = "normal x1.5", data = 1.5},
			{description = "very hard x2.5", data = 2.5}
		},
		default = 1
	},
	{
		name = "musha_intelligence",
		label = "Knowledge",
		hover = "Science Bonus",
		options = {
			{description = "Normal(+0)", data = 0},
			{description = "Smart(+1)", data = 1},
			{description = "Genius(+2)", data = 2}
		},
		default = 0
	},
	{
		name = "share_items",
		label = "Share items",
		hover = "Can musha share her gears with another characters?",
		options = {
			{description = "No", data = false},
			{description = "Yes", data = true}
		},
		default = false
	},
	{
		name = "no_butterfly_shield",
		label = "Forst Armor: shield form",
		hover = "Using butterfly form by mouse Right button",
		options = {
			{description = "On", data = false},
			{description = "Off", data = true}
		},
		default = false
	},
	{
		name = "moontree_spawn",
		label = "Dall: servant",
		hover = "[Yes]:Moontree(Dall) will spawn his servant and plants.(Default)\n[No]:Moontree(Dall) won't spawning his servant and plants",
		options = {
			{description = "Yes", data = true},
			{description = "No", data = false}
		},
		default = true
	},
	{
		name = "lightning_sound",
		label = "Loud Lightning Effect",
		hover = "Recommended for single play.\nOption1:effect with Power Lightning(R-key)\nOption2:effect with Power and Call Lightning(R-key)\nOption3:effect with All skill Lightning(passive valkyrie lightning)",
		options = {
			{description = "Enable", data = true},
			{description = "Disable", data = false}
		},
		default = true
	},
	{
		name = "no_armor_limit",
		label = "Armor Pocket",
		hover = "Whether you can take along more than one musha's armor.",
		options = {
			{description = "No", data = false},
			{description = "Yes", data = true}
		},
		default = false
	},
	{
		name = "musha_fast_work",
		label = "Musha Fast Work",
		hover = "Whether musha can work faster while her stamina is high and fatigue is low.",
		options = {
			{description = "Yes", data = true},
			{description = "No", data = false}
		},
		default = true
	},
	--[[{
		name = "bodyguardwilson",
		label = "Wilson",
		hover = "Bodyguard Wilson (random skill)",
		options = {
			{description = "Enable", data = true},
			{description = "Disable", data = false}
		},
		default = false
	}, ]]
	Breaker("Game Recipe"),
	{
		name = "convertgem",
		label = "Gem Recipe",
		hover = "Set what material you will need to make common gemstones.",
		options = {
			{description = "Just Convert Gem", data = true},
			{description = "Make Gem with Magic", data = false}
		},
		default = true
	},
	{
		name = "raregemrecipes",
		label = "More Gem Recipe",
		hover = "Set wether you can make rare gemstones.",
		options = {
			{description = "Enable", data = true},
			{description = "Disable", data = false}
		},
		default = false
	},
	{
		name = "rabbitrecipe",
		label = "Rabbit recipe",
		hover = "Set material you will need to make rabbit hat.",
		options = {
			{description = "Rabbit Fur", data = false},
			{description = "Desert Hat", data = true}
		},
		default = true
	},
	Breaker("Musha Settings"),
	{
		name = "princess_sleep",
		label = "Piggy or Princess",
		hover = "[Princess]: She can only sleep at duck or night.\n[Piggy]: She can sleep in any time.",
		options = {
			{description = "Piggy", data = false},
			{description = "Princess", data = true}
		},
		default = true
	},
	{
		name = "princess_taste",
		label = "Piggy or Princess",
		hover = "[Princess]: She can not eat a something when 'hunger' is more than 90%.\n[Piggy]: She can always eat a something.",
		options = {
			{description = "Piggy", data = false},
			{description = "Princess", data = true}
		},
		default = true
	},
	{
		name = "edible_food_type",
		label = "Edible Food Type",
		hover = "The Type of food she can eat.\nRegardless of this option, she can eat all of food type when her hunger is below 0.",
		options = {
			{description = "Both", data = "normal"},
			{description = "Only-Meat", data = "meat"},
			{description = "Only-Veggie", data = "veggie"}
		},
		default = "normal"
	},
	{
		name = "dis_food_type",
		label = "Dislike Food Type",
		hover = "'Dis' meaning is Dislike food type.(sanity penalty)\nRegardless this option, she like caffeine apple and doesn't like eating butterflies.",
		options = {
			{description = "Normal", data = "normal"},
			{description = "Dis-Meat", data = "MEAT"},
			{description = "Dis-Veggie", data = "VEGGIE"}
		},
		default = "normal"
	},
	{
		name = "shadowhide_real",
		label = "Shadow Hide",
		hover = "Set Whether other player can see you when you use the Shadow Hide skill.",
		options = {
			{description = "Yes", data = false},
			{description = "No", data = true}
		},
		default = false
	},
	{
		name = "hud",
		label = "HUD",
		hover = "Select a hud style.",
		options = {
			{description = "Style 01", data = 1},
			{description = "Style 02", data = 2}
		},
		default = 1
	},
	{
		name = "EnhanceHud",
		label = "HUD",
		hover = "Enhance adapt to Combined Status.",
		options = {
			{description = "Enable", data = true},
			{description = "Disable", data = false}
		},
		default = false
	},
	{
		name = "avisual_musha",
		label = "Visual of Musha backpack",
		hover = "Change visual of back",
		options = {
			{description = "None", data = "off"},
			{description = "Pack-Mini", data = "Bmm"},
			{description = "Pack-Tiny", data = "BT"},
			{description = "Pack-Small", data = "BS"},
			{description = "Pack-Med", data = "BM"},
			{description = "Pack-Large", data = "BL"},
			{description = "Wing-S-pink", data = "WSP"},
			{description = "Wing-S-red", data = "WSR"},
			{description = "Wing-S-blue", data = "WSB"},
			{description = "Wing-S-hybrid", data = "WSH"},
			{description = "Wing-L-red", data = "WLR"},
			{description = "Wing-L-blue", data = "WLB"}
		},
		default = "Bmm"
	},
	{
		name = "avisual_princess",
		label = "Visual of Princess backpack",
		hover = "Change visual of back",
		options = {
			{description = "None", data = "off"},
			{description = "Pack-Mini", data = "Bmm"},
			{description = "Pack-Tiny", data = "BT"},
			{description = "Pack-Small", data = "BS"},
			{description = "Pack-Med", data = "BM"},
			{description = "Pack-Large", data = "BL"},
			{description = "Wing-S-pink", data = "WSP"},
			{description = "Wing-S-red", data = "WSR"},
			{description = "Wing-S-blue", data = "WSB"},
			{description = "Wing-S-hybrid", data = "WSH"},
			{description = "Wing-L-red", data = "WLR"},
			{description = "Wing-L-blue", data = "WLB"}
		},
		default = "WSP"
	},
	{
		name = "avisual_pirate",
		label = "Visual of Pirate backpack",
		hover = "Change visual of back",
		options = {
			{description = "None", data = "off"},
			{description = "Pack-Mini", data = "Bmm"},
			{description = "Pack-Tiny", data = "BT"},
			{description = "Pack-Small", data = "BS"},
			{description = "Pack-Med", data = "BM"},
			{description = "Pack-Large", data = "BL"},
			{description = "Wing-S-pink", data = "WSP"},
			{description = "Wing-S-red", data = "WSR"},
			{description = "Wing-S-blue", data = "WSB"},
			{description = "Wing-S-hybrid", data = "WSH"},
			{description = "Wing-L-red", data = "WLR"},
			{description = "Wing-L-blue", data = "WLB"}
		},
		default = "BL"
	},
	{
		name = "avisual_pirate_armor",
		label = "Pirate Armor parts",
		hover = "Change visual of Pirate Armor",
		options = {
			{description = "Chest", data = "Chest"},
			{description = "Pirate", data = "Pirate"},
			{description = "Musha", data = "Green"},
			{description = "Princess", data = "Pink"},
			{description = "Frost", data = "Blue"}
		},
		default = "Pirate"
	},
	Breaker("Musha Skill Keys"),
	{
		name = "level_info",
		label = "Musha Level",
		hover = "Show Musha Level.",
		options = key_table,
		default = 108
	},
	{
		name = "skill_ui",
		label = "Musha Skill Menu",
		hover = "Show Musha skills information.",
		options = key_table,
		default = 107
	},
	{
		name = "specialattackswitch",
		label = "Active ElectricAttack",
		hover = "Active ElectricAttack.",
		options = key_table,
		default = 114
	},
	{
		name = "shadowhide",
		label = "Hide and Sneak Attack",
		hover = "Hide in shadow and assassinate enemy",
		options = key_table,
		default = 103
	},
	{
		name = "electricshield",
		label = "Active Shield",
		hover = "Spark Shield Spell",
		options = key_table,
		default = 99
	},
	{
		name = "sniff",
		label = "Sniff",
		hover = "Search For Treasures.",
		options = key_table,
		default = 117
	},
	{
		name = "sing",
		label = "Sing",
		hover = "Sing a Song.",
		options = key_table,
		default = 111
	},
	{
		name = "sleep_switch",
		label = "Active Sleep",
		hover = "Sleep or Wake",
		options = key_table,
		default = 116
	},
	Breaker("Order Keys"),
	{
		name = "order_musha_yamche_1",
		label = "Yamche Order: Follow or Stay",
		hover = "Command: [Follow or Stay]",
		options = key_table,
		default = 122
	},
	{
		name = "order_musha_yamche_2",
		label = "Yamche Order",
		hover = "Command: [Guard,Avoid,Pick]",
		options = key_table,
		default = 98
	},
	{
		name = "order_musha_beefalo",
		label = "Arong Order: Follow or Stay",
		hover = "Companion Arong",
		options = key_table,
		default = 282
	},
	{
		name = "order_musha_moontree",
		label = "Dall Order: Follow or Stay",
		hover = "Companion Dall",
		options = key_table,
		default = 283
	}
}
